{% import 'admin/macro.html.twig' as admin_macro %}
<tr id="group-table-tr-{{ group.id }}">
    <td>{{ group.id}}</td>

    <td>
    <strong>  
      <a target="_blank" href="{{ path('group_show', {id:group.id}) }}">{{ group.title}}</a>
    </strong>
    {% if group.status=='close' %}
          <label class="label label-danger">{{'admin.operation_group.group_status.close'|trans}}</label>
    {% endif %}
    </td>

    <td>
    <a target="_blank" href="{{ path('user_show', {id:owners[group.ownerId].id}) }}">
   {{owners[group.ownerId].nickname}}</a>
    </td>

    <td>
    {{ group.memberNum }}
    </td>

    <td>
    {{ group.threadNum }}
    </td>

    <td>
    {{ group.postNum }}
    </td>

    <td>
    {% if group.status=='open' %}
    {{'admin.operation_group.group_status.open'|trans}}
    {% else %}
    {{'admin.operation_group.group_status.close'|trans}}
    {% endif %}
    </td>

    <td>

  <div class="btn-group">

    <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
      {{'admin.operation_group.edit_btn'|trans}}
      <span class="caret"></span>
    </button>

    <ul class="dropdown-menu">
       <li><a href="{{path('group_show',{id:group.id})}}" target="_blank"><span class="glyphicon glyphicon-eye-open"></span> {{'admin.operation_group.viewGroup_btn'|trans}}</a></li>

       {% if group.status=='open'%}
       <li><a href="javascript:" class="close-group" title="{{ 'admin.operation_group.closeGroup_title'|trans({'%groupTitle%':group.title}) }}" data-url="{{path('admin_group_close',{id:group.id})}}"><span class="glyphicon glyphicon-off"></span> {{'admin.operation_group.closeGroup_btn'|trans }}</a></li>

       {% else %}
       <li><a href="javascript:" class="open-group" title="{{ 'admin.operation_group.openGroup_title'|trans({'%groupTitle%':group.title}) }}" data-url="{{path('admin_group_open',{id:group.id})}}"><span class="glyphicon glyphicon-ok"></span>{{'admin.operation_group.openGroup_btn'|trans}}</a></li>

       {% endif %}

       <li  ><a href="javascript:" class="transfer-group" data-url="{{path('admin_group_transfer',{groupId:group.id})}}"><span class="glyphicon glyphicon-refresh"></span> {{'admin.operation_group.transferGroup_btn'|trans}}</a></li>
       
    </ul>
  </div>
 </td>
</tr>